 /**
 * Created by bianbian3 on 2018/8/29.
 */

import React, { Component, PropTypes } from 'react';
import { View, StyleSheet, TouchableHighlight, Dimensions, Text } from 'react-native';
import { MtChar, MtCheckItem, MtColor,M } from 'martian-ui';
const { MtM1, MtT3 } = MtChar;
 import { Switch } from 'react-native-switch';
 import BoxShadowYaGuan from '../../components/common/BoxShadowYaGuan';
 const { width, height } = Dimensions.get('window');
 import { BoxShadow } from 'react-native-shadow'
 import {Icon} from '../../components/common/icon'
class LabelBarWithSwitch extends Component {
    constructor(props) {
        super(props)
        this.state = {
        }
    }

    render() {
        const { title, barWidth,barHeight, rightValue, containerStyle } = this.props;
        const { switchValue } = this.state;

        return (
        <View style={[{ flex: 1, alignItems:'center'}, containerStyle]}>
        <BoxShadowYaGuan

            width={barWidth}
            height={barHeight}
            renderItem={()=>{
                return (
                        <View style={[styles.power, styles.flex]}>
                            <Text style={styles.powerText}>{title}</Text>
                            <Text style={styles.powerText1}>{rightValue}</Text>
                            <Icon name="icon_jiantou" size={16} color="#d3d3d3" style={styles.arrow} />
                        </View>
                )
            }}
        />
            </View>

        );
    }
}

const styles = StyleSheet.create({
    flex: {
        paddingLeft: 20,
        paddingRight: 20,
    },
    arrow:{
        marginTop: 5
    },
    senerState: {
        height: 180,
        width: width - 30,
        justifyContent: 'center',
        backgroundColor: '#fff',
        borderRadius: 4,
        paddingHorizontal: 15,
        paddingVertical: 20,
    },
    powerText: {
        fontSize: 14,
        fontWeight: 'bold',
        color: '#333333',
        flex:1,
    },
    powerText1: {
        fontSize: 12,

        color: '#d3d3d3',
    },
    powerSwitch: {
    },
    power: {
        height: 68,
        width: width - 30,
        backgroundColor: '#fff',
        borderRadius: 6,
        flexDirection:'row',
        alignItems: 'center',
        flex:1,
    },
    senerList: {
        height: 390,
        width: width - 30,
        backgroundColor: '#fff',
        borderRadius: 4,
        paddingHorizontal: 15,
        paddingVertical: 20,
    },
});

module.exports = LabelBarWithSwitch;
